using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UwinEducation.Domain.IRepositories;

namespace UwinEducation.Domain.Entities
{

    /// <summary>
    /// 可审计实体基类
    /// </summary>
    public abstract class EntityBase: ISoftDelete
    {
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 创建人ID
        /// </summary>
        public Guid? CreatedBy { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 最后更新人ID
        /// </summary>
        public Guid? UpdatedBy { get; set; }

        /// <summary>
        /// 软删除标记
        /// </summary>
        public bool IsDeleted { get; set; }



        /// <summary>
        /// 行版本号（用于乐观并发控制）
        /// </summary>
        [Timestamp]
        public byte[] RowVersion { get; set; }


    }
}